/*
#include<stdio.h>
#include<stdlib.h>
#include<assert.h>
typedef struct node
{
	int data;
	struct node* next;
}Node;
Node* initStack()
{
	Node* S = (Node*)malloc(sizeof(Node));
	assert(S);
	S->data = 0;
	S->next=NULL;
	return S;
}
void push(Node* s,int x)
{
	Node* node = (Node*)malloc(sizeof(node));
	assert(node);
	node->data = x;
	node->next = s->next;
	s->next = node;
	s->data++;
}
int is_emepty(Node* S)
{
	if (S->data == 0 || S->next == NULL)
		return 1;
	else
		return 0;
}
int Gettop(Node* S)
{
	if (is_emepty(S))
		return -1;
	else
		return S->next->data;
}
int pop(Node* S)
{
	int d;

	Node* node = S->next;
	if (is_emepty(S))
	{
		return -1;
	}
	else
	{
		d = node->data;
		S->next = node->next;
	
		return d;
	}
	
}
void printStack(Node* S)
{
	Node* node = S->next;
	while (node != NULL)
	{
		printf("%d->", node->data);
		node = node->next;
	}
	printf("NULL\n");
}
int main()
{
	Node* S = initStack();
	push(S, 1);
	push(S, 2);
	push(S, 3);
	pop(S);
	printf("%d\n", Gettop(S));
		printStack(S);
	return 0;
}
*/